﻿<?xml version="1.0" encoding="utf-8" ?>
<Recipe Name="RegisterVSPackage" xmlns="http://schemas.microsoft.com/pag/gax-core"
                               xmlns:xi="http://www.w3.org/2001/XInclude" Bound="false">
  <DocumentationLinks>
    <Link Kind="Documentation" Caption="VSPackage Registration" Url="ms-help://MS.VSCC.v80/MS.VSIPCC.v80/MS.VSSDK.v80/dv_vsintegration/html/ecd20da8-b04b-4141-a8f4-a2ef91dd597a.htm" />
    <Link Kind="Documentation" Caption="How to: Register a VSPackage" Url="ms-help://MS.VSCC.v80/MS.VSIPCC.v80/MS.VSSDK.v80/dv_vsintegration/html/e25e7a46-6a55-4726-8def-ca316f553d6b.htm" />
  </DocumentationLinks>
  <xi:include href="../Common/CommonTypeAliases.xml"
				xpointer="xmlns(gax=http://schemas.microsoft.com/pag/gax-core) xpointer(/gax:Types)" />
  <Caption>Register VS Package</Caption>
  <Description>Register VS Package</Description>
  <HostData>
    <Icon ID="462" />
    <CommandBar Menu="VSSDKAssistProjectUtility"/>
  </HostData>
  <Arguments>
    <xi:include href="../Common/CommonArguments.xml"
					  xpointer="xmlns(gax=http://schemas.microsoft.com/pag/gax-core) xpointer(/gax:Arguments/gax:Argument)" />
    <Argument Name="VSPackageProject" Type="EnvDTE.Project, EnvDTE, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Required="true">
      <ValueProvider Type="VSSDKAssist.Assets.ValueProviders.VisualStudio.CurrentlySelectedProjectValueProvider, VSSDKAssist.Assets"
                     Stage="OnBeginRecipe"/>
    </Argument>
    <Argument Name="RegistrationMethod" Type="Microsoft.VisualStudio.Shell.RegistrationMethod, Microsoft.VisualStudio.Shell, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Required="true">
      <ValueProvider Type="VSSDKAssist.Recipes.Common.ValueProviders.DefaultRegistrationMethodValueProvider, VSSDKAssist"
               Stage="OnBeginRecipe"/>
    </Argument>
  </Arguments>
  <GatheringServiceData>
    <Wizard xmlns="http://schemas.microsoft.com/pag/gax-wizards" SchemaVersion="1.0">
      <Pages>
        <Page Type="VSSDKAssist.Recipes.RegisterVSPackage.RegisterVSPackageCP, VSSDKAssist"
          Height="200" Width="510">
          <Title>Specify VS Package registration properties</Title>
          <LinkTitle>VS Package registration properties</LinkTitle>
        </Page>
      </Pages>
    </Wizard>
  </GatheringServiceData>  
  <Actions CoordinatorServiceType="VSSDKAssist.Recipes.Common.Coordinators.ExecutionProgressCoordinator, VSSDKAssist">
    <!--Compile project-->
    <Action Name="CompileProject"
          Type="VSSDKAssist.Assets.Actions.VisualStudio.CompileProjectAction, VSSDKAssist.Assets"
          StatusMessage="Compiling project"
          WriteMessageToOutputWindow="true">
      <Input Name="Project" RecipeArgument="VSPackageProject"/>
    </Action>
    <!--Unregister package to remove registration info from previous compilation-->
    <Action Name="UnregisterPackage"
          Type="VSSDKAssist.Recipes.Common.Actions.RegisterVSPackageAction, VSSDKAssist"
          RegistrationMode="Unregister">
      <Input Name="Project" RecipeArgument="VSPackageProject"/>
    </Action>    
    <!--Register Package-->
    <Action Name="RegisterPackage"
          Type="VSSDKAssist.Recipes.Common.Actions.RegisterVSPackageAction, VSSDKAssist"
          RegistrationMode="Register"
          StatusMessage="Registering package"
          WriteMessageToOutputWindow="true">
      <Input Name="Project" RecipeArgument="VSPackageProject"/>
      <Input Name="RegistrationMethod" RecipeArgument="RegistrationMethod"/>
    </Action>
  </Actions>
</Recipe>